<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@page import="com.xyy.entity.SessionEntity"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
	SessionEntity sessionEntity = (SessionEntity)session.getAttribute("sessionEntity");
	java.util.Date thisday=new java.util.Date();
%>
<html>
	<head>
		<title>欢迎使用电信工单管理系统</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<style type="text/css">
			.right{float:right; text-align:right;}
		</style>
		
		<link rel="shortcut icon" href="images/system/china_mobile.ico"
			type="image/x-icon" />
		<link rel="stylesheet" type="text/css"
			href="scripts/ext/resources/css/ext-all.css">
		<link rel="stylesheet" type="text/css"
			href="scripts/ext/resources/css/icon.css">
		<link rel="stylesheet" type="text/css"
			href="scripts/ext/portal/sample.css" />
		<link rel="stylesheet" type="text/css"
			href="scripts/ext/portal/portal.css" />
		<script type="text/javascript" src="scripts/ext/ext-base.js"></script>
		<script type="text/javascript" src="scripts/ext/ext-all.js"></script>
		<script type="text/javascript" src="scripts/ext/portal/Portal.js"></script>
		<script type="text/javascript"
			src="scripts/ext/portal/PortalColumn.js"></script>
		<script type="text/javascript" src="scripts/ext/portal/Portlet.js"></script>
		<script type="text/javascript" src="scripts/ext/examples.js"></script>
		<script type="text/javascript" src="<%=basePath %>bulletin/js/detial.js"></script>
	</head>
	<body>
		<script>
var time = '<%=thisday.getYear()+1900 %>'+'-'+ '<%=thisday.getMonth()+1%>'+'-'+'<%=thisday.getDate() %>'+'  '+'<%=thisday.getHours() %>'+':'+'<%=thisday.getMinutes() %>'+':'+'<%=thisday.getSeconds() %>';
var one;     <%-- 工单超时警告 --%>
var two;     <%-- 待发送工单统计 --%>
var three;   <%-- 待维修工单 --%>
var four;         <%-- 本月接机工单 --%>
Ext.Ajax.request({
	url : '/fjty_service/login/action_statistics.do',
	success : function(response, options) {
		var obj = Ext.decode(response.responseText);
		one=obj.totletime;
		two=obj.sendorder;
		three=obj.maintenance;
		four=obj.totle;
		<%-- alert('工单超时警告'+one+'待发送工单统计'+two+'待维修工单'+three+'本月接机工单'+four); --%>
		Ext.getCmp("orderGK").setSource({ "<font color='red'>超时告警工单</font>": one,"待发送工单": two,"待维修工单": three,"本月接机工单": four});
	}
});
Ext.onReady(function(){
	Ext.grid.PropertyColumnModel.prototype.nameText = '';
	Ext.grid.PropertyColumnModel.prototype.valueText = '';
    var tools = [{ id:'close', handler: function(e, target, panel){ panel.ownerCt.remove(panel, true); } }];
    var viewport = new Ext.Viewport({ 
    			   		layout:'border',
    					items:[{ xtype:'portal', 
    							region:'center', 
    							items:[{ columnWidth:.45,
    								style:'padding:10px 0 10px 10px',
    								items:[{ title: '个人信息',
    										 tools: tools, collapsible: true, iconCls:'icon-system-s-users', 
    										 split:true, width: 140, height:200, minSize: 175, maxSize: 300,
    										 layout:'fit', margins:'0 5 0 0', 
    										 items:new Ext.grid.PropertyGrid({ 
    										 	closable: true,
    										 	autoHeight: true, 
    										 	autoSort:false,
    										 	listeners: { "beforeedit":function(e){  
    										 								 e.cancel = true;   return false; 
    										 								   }
    										 			 },
    										 	 source: { "&nbsp工号": '<%=sessionEntity.getUserName()%>',
    										 	 			 "&nbsp姓名": '<%=sessionEntity.getName()%>', "&nbsp登录时间": time, "&nbsp公司名称": '喜洋洋时尚装饰建材'} }) }] 
    							}] }] });
});
</script>
	</body>
</html>